package com.codingxyz.simple.threadDemo;

public class ThreadDemo {

    public static void main(String[] args) {
        ThreadThread threadThread = new ThreadThread();
        threadThread.setName("测试1");
        threadThread.start();

        ThreadRunnable threadRunnable = new ThreadRunnable();
        Thread t = new Thread(threadRunnable,"runable test ");
        t.start();

        new Thread(()->{
            System.out.println(Thread.currentThread().getName());
        },"name1").start();

    }
}
